﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace comix
{
    public partial class transactions : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
        {
            LCustomer user = (LCustomer)Session["customer"];
            if (user.Id == -1)
                Response.Redirect("home.aspx");
            else
                e.Command.Parameters["@usr_id"].Value = user.Id;
        }

        protected string TransactionType(object o)
        {
            int tp = Convert.ToInt32(o);
            switch(tp)
            {
                case 1:
                    return "iPhone/iPad";
                case 2:
                    return "Web";
                case 3:
                    return "Windows Viewer";
            }
            return "";
        }
    }
}
